import { makeAutoObservable } from 'mobx'
import { history } from 'umi'
import { getData } from '@/servers/http'
import { api } from '@/servers/api'

class Store {
    matchInfo: any = {}

    constructor() {
        makeAutoObservable(this)
    }

    /** 获取岗位匹配记录 */
    getMatchInfo = () => {
        const { id } = history.location.query || {}

        getData(`${api.professionsMatchInfo}${id}`).then(({ status, data }) => {
            if (status === 200 && data) {
                this.matchInfo = data
            }
        })
    }
}
export default Store
